﻿using System;
using System.Linq;

namespace KSPCapability
{
	[Serializable]
	public class Capability
	{
		public string Body { get; set; }
		public double Mass { get; set; }
		public double Altitude { get; set; }
		public double Inclination { get; set; }
		public double LAN { get; set; }

		public Orbit ToOrbit()
		{
			var body = FlightGlobals.Bodies.First(b => b.GetName() == Body);

			return new Orbit(Inclination, 0, Altitude + body.Radius, LAN, 0, 0, 0, body);
		}
	}
}